This section provides background information related to the present disclosure which is not necessarily prior art.
TCP is a reliable packet transmission control protocol which achieves packet retransmission through a slide window scheme. However, the complexity of TCP sequence number acknowledgement and retransmission schemes makes it hard to backup a TCP connection.
Currently, there are generally two methods to back up the TCP connection, i.e., TCP multicast scheme and TCP mirror scheme. In the TCP multicast scheme, packets received and transmitted by an active TCP connection is backed up to a standby TCP connection. This scheme may bring loss of the packets and disorder of the packets. In the TCP mirror scheme, each of an Active Main Board (AMB) and a Standby Main Board (SMB) includes an application module, a TCP module and a socket. The TCP module of the SMB processes packets first, i.e., during a packet receiving process, the TCP module of the SMB receives the packets first, then duplicates the packets received and sends the packets duplicated to the TCP module of the AMB. During a packet transmission process, the TCP module of the AMB sends packets to the TCP module of the SMB first and the TCP module of the SMB sends the packets out. As the backup is implemented in the TCP layer, the TCP module of the AMB may segment data from the application module into multiple TCP packets and send the TCP packets to the TCP module of the SMB. The utilization rate of Inter-Process Communication (IPC) channel is rather low. Moreover, the backup of the packets occupies lots of resources and the communication efficiency is low. In addition, all the operations in the TCP mirror scheme have to be completed by the TCP module of the SMB first, which involves redundant processing steps and decreases the communication efficiency.
When the application module of the AMB has data to send, the TCP module of the AMB segments the data into multiple packets. Suppose a TCP connection switchover occurs when some of the packets have been sent to a peer side of the TCP connection. If the TCP module of the SMB re-transmits all the packets after the TCP connection switchover, the peer side will combine the packets received before the switchover with those received after the switchover to obtain the data sent by the application module of the AMB. Because there are duplicate packets between the packets received before the switchover and those after the switchover, the sequence numbers of the duplicate packets are different, the data obtained are incomplete and incorrect.